//https://leetcode.cn/problems/find-a-good-subset-of-the-matrix/?envType=daily-question&envId=2024-06-25


class Solution {
public:
    vector<int> goodSubsetofBinaryMatrix(vector<vector<int>>& grid) {
        int size1 = grid.size();
        int size2 = grid[0].size();
        for(int i = 0; i<size1;i++){
            bool tt =true;
            for(int j = 0;j<size2;j++){
                if(grid[i][j] == 1)
                {
                    tt =false;
                    break;
                }
            }
            if(tt){
                return vector<int>{i};
            }
            for(int j = i+1;j<size1;j++){
                bool t = true;
                for(int k = 0;k<size2;k++){
                    if(grid[i][k] + grid[j][k] ==2){
                        t = false;
                        break;
                    }
                }
                if(t){
                    return vector<int>{i,j};
                }
            }
        }
        return vector<int>{};
    }
};
// 0 1 1 0
// 0 0 0 1
// 1 1 1 1